<?php
class ti_convert 
{
	static $multipliers = array(
		'centi'=>0.01,
	);
	#	
	#);
	
	
	function english_to_metric($unit,$value,$prefix='')
	{
		if($prefix != '')
			$value = ti_convert::base($prefix,$value);
			
		switch($unit)
		{
			case 'degree':
				$value = (($value - 32) * (5/9));
				break;
			case 'inch':
				$value = $value / 39.37007874;
				break;
			case 'feet':
				$value *= 3.28;
				break;		
		}
		return $value;
	}
	
	function base($prefix,$value)
	{
		return $value * ti_convert::$multipliers[$prefix];
	}
}
?>